package designpatterns.decoratorpattern;

public class TimeFlyDecorator extends FlyableDecorator{
    public TimeFlyDecorator(Flyable flyable) {
        super(flyable);
    }
    @Override
    public void fly() {
        long begin = System.currentTimeMillis();
        super.fly();
        long end = System.currentTimeMillis();
        System.out.println("飞翔用时：" + (end - begin) + "毫秒");
    }
}
